package Demo2;

public class Test {
    public static void main(String[] args) {
        Computer computer = new Computer();
        //电脑开始工作
        computer.powerOn();
        //鼠标工作
        Mouse mouse = new Mouse();
        computer.useService(mouse);
        System.out.println("==============");
        //键盘工作
        KeyBoard keyBoard = new KeyBoard();
        computer.useService(keyBoard);
        //电脑结束工作
        computer.powerOff();
    }
}
